Optimal. Leaf size=36 \[ \frac {x}{2}+\frac {1}{2} \cos ^2\left (\sqrt {x}\right )+\sqrt {x} \sin \left (\sqrt {x}\right ) \cos \left (\sqrt {x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.02, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {3362, 3310, 30} \[ \frac {x}{2}+\frac {1}{2} \cos ^2\left (\sqrt {x}\right )+\sqrt {x} \sin \left (\sqrt {x}\right ) \cos \left (\sqrt {x}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 3310
Rule 3362
Rubi steps
\begin {align*} \int \cos ^2\left (\sqrt {x}\right ) \, dx &=2 \operatorname {Subst}\left (\int x \cos ^2(x) \, dx,x,\sqrt {x}\right )\\ &=\frac {1}{2} \cos ^2\left (\sqrt {x}\right )+\sqrt {x} \cos \left (\sqrt {x}\right ) \sin \left (\sqrt {x}\right )+\operatorname {Subst}\left (\int x \, dx,x,\sqrt {x}\right )\\ &=\frac {x}{2}+\frac {1}{2} \cos ^2\left (\sqrt {x}\right )+\sqrt {x} \cos \left (\sqrt {x}\right ) \sin \left (\sqrt {x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 31, normalized size = 0.86 \[ \frac {1}{4} \left (2 \left (x+\sqrt {x} \sin \left (2 \sqrt {x}\right )\right )+\cos \left (2 \sqrt {x}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.26, size = 24, normalized size = 0.67 \[ \sqrt {x} \cos \left (\sqrt {x}\right ) \sin \left (\sqrt {x}\right ) + \frac {1}{2} \, \cos \left (\sqrt {x}\right )^{2} + \frac {1}{2} \, x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.41, size = 23, normalized size = 0.64 \[ \frac {1}{2} \, \sqrt {x} \sin \left (2 \, \sqrt {x}\right ) + \frac {1}{2} \, x + \frac {1}{4} \, \cos \left (2 \, \sqrt {x}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 34, normalized size = 0.94 \[ 2 \sqrt {x}\, \left (\frac {\cos \left (\sqrt {x}\right ) \sin \left (\sqrt {x}\right )}{2}+\frac {\sqrt {x}}{2}\right )-\frac {x}{2}-\frac {\left (\sin ^{2}\left (\sqrt {x}\right )\right )}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.66, size = 23, normalized size = 0.64 \[ \frac {1}{2} \, \sqrt {x} \sin \left (2 \, \sqrt {x}\right ) + \frac {1}{2} \, x + \frac {1}{4} \, \cos \left (2 \, \sqrt {x}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.35, size = 23, normalized size = 0.64 \[ \frac {x}{2}-\frac {{\sin \left (\sqrt {x}\right )}^2}{2}+\frac {\sqrt {x}\,\sin \left (2\,\sqrt {x}\right )}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.25, size = 51, normalized size = 1.42 \[ \sqrt {x} \sin {\left (\sqrt {x} \right )} \cos {\left (\sqrt {x} \right )} + \frac {x \sin ^{2}{\left (\sqrt {x} \right )}}{2} + \frac {x \cos ^{2}{\left (\sqrt {x} \right )}}{2} - \frac {\sin ^{2}{\left (\sqrt {x} \right )}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________